﻿# score=int(input('请输入你的成绩：'))
# if score>=90:
#     print('你的成绩为a')
#     pass
# elif score>=80:
#     print('你的成绩为b')
#     pass
# elif score>=70:
#      print('你的成绩为c')
#      pass
# elif score>=60:
#      print('你的成绩为d')
#      pass
# else:print('你未及格')
# [0:剪刀 1:石头 2:布]
import random
print('这是一个猜拳游戏，你只有三次机会')
count=1
while count<=3:
    person=int(input('请输入[0:剪刀 1:石头 2:布]:'))
    computer2=random.randint(0,2)
    print('你出的是%d[0:剪刀 1:石头 2:布]'%(person))
    print('机器人出的是%d[0:剪刀 1:石头 2:布]'%(computer2))
    if person==1 and computer2==0:
        print('恭喜你赢了')
        pass
    elif person==0 and computer2==2:
        print('恭喜你赢了')
        pass
    elif person==2 and computer2==1:
        print('恭喜你赢了')
        pass   
    elif person==computer2:
        print('平手')
        pass
    else:print('机器人赢了')
    count+=1
    pass
